/**
 * 项目示例-列表综合搜索
 * Date 2023-5-25 09:33:56
 * {
 *   label: '', 筛选项名称
 *   prop: '', 筛选项字段
 *   type: '', 组件类型（'input' | 'select' | 'inputNumber' | 'cascader' | 'datePicker' | 'timePicker' | 'timeSelect' | 'treeSelect' | 'checkbox' | 'radio'）
 *   defaultValue: '', 筛选项默认值（不写默认undefined）
 *   inputProps: {}, 过滤组件属性，跟`ElementPlus`对应组件的`#Attributes`相同
 *   events: {} 仅支持change事件
 * }
 */
import type { FilterItem } from "@/components/FilterBar/types";
export const visualOptions: FilterItem[] = [
  {
    label: "设备编号",
    prop: "eqptCode",
    type: "input",
    span: 12,
    inputProps: {
      placeholder: "支持模糊搜索",
    },
  },
  {
    label: "类型",
    prop: "eqptType",
    filterable: true,
    type: "select",
    span: 12,
    defaultValue: "",
    inputProps: {
      placeholder: "请输入类型",
      options: [
        { label: "全部", value: "" },
        { label: "豪宅", value: "豪宅" },
      ],
    },
    events: {
      change: (value: any, evt: any) => {
        console.log(value, evt);
      },
    },
  },
  {
    label: "设备名称",
    prop: "eqptName",
    type: "input",
    span: 12,
    inputProps: {
      placeholder: "支持模糊搜索",
    },
  },
  {
    label: "状态",
    prop: "status",
    filterable: true,
    type: "select",
    defaultValue: "",
    span: 12,
    inputProps: {
      options: [
        { label: "全部", value: "" },
        { label: "正常", value: "1" },
        { label: "故障", value: "0" },
      ],
    },
  },
];
